package com.cy.web;

import com.cy.bean.Coach;
import com.cy.bean.Subjectscore;
import com.cy.service.StudentManageService;
import com.cy.token.JwtUtil;
import com.cy.token.ResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class StudentManageController {
    @Autowired
    private StudentManageService studentManageService;

    @GetMapping("/getStudentList")
    public ResultResponse getStudentList(Subjectscore subjectscore, HttpServletRequest httpServletRequest){

        subjectscore.setDid(2);

        ResultResponse resultResponse = new ResultResponse();
        resultResponse.setCode(20000);
        resultResponse.setMessage(JwtUtil.TOKEN_SUCCESS);
        resultResponse.setData(studentManageService.getStudentList(subjectscore));
        return resultResponse;
    }
}
